A sheet feed tray of an image forming apparatus performs a tray-up operation at a timing at which a power supply of the image forming apparatus is turned on or at a timing at which a sheet feed tray is opened or closed. The image forming apparatus detects a remaining quantity of sheets in a sheet housing section in the tray-up operation. A user of the image forming apparatus may use a part of the sheet feed tray as a container.